<%@ page import="java.util.*"%>
<%@ page import="objects.*"%>
<%@ page import="Domain.UserClient.ButtonsFunctions"%>
<%@page import="Domain.DataManager"%>

<%
	DataManager dm = (DataManager) (session.getAttribute("dm"));
	ButtonsFunctions bf = (ButtonsFunctions) (session
			.getAttribute("bf"));

	if (dm == null || dm.getUserStatus() == DataManager.DISCONNECTED) {
		response.sendRedirect("Welcome.jsp");
	} else {
%>

<%
	String nameOfUser = request.getParameter("nameOfUser");
    bf.processGetUsers();
    Vector<User> users = dm.getVectorUser();

    for(int i = 0; i < users.size(); i++)
    {
    	User user = users.elementAt(i);
    	if(user.getUserName().equals(nameOfUser))
    	{
    		if(user.getType().equals(User.Type.MANAGER))
    			out.print("type of user is 'Manager'");
    		else
    			out.print("type of user is 'User'");
    	}
    }
%>

<%
	}
%>
